package com.campus.service;

import com.campus.entity.User;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface UserService {
    @Transactional(readOnly = true)
    User login(String loginName, String password);

    @Transactional
    void register(User user);

    @Transactional(readOnly = true)
    List<User> searchUserByNameOrId(String loginName, Integer id);
}
